﻿using System.Collections.Generic;
using UnityEngine;

namespace tool
{
    public class TimerManager
    {
        private static Dictionary<string, Timer> _timers = new Dictionary<string, Timer>();


        public static bool CheckTimeUp(string name, float deltaTime, float interval)
        {
            if (!_timers.ContainsKey(name))
            {
                _timers.Add(name, new Timer(interval));
            }

            _timers[name].AddTime(deltaTime);
            return _timers[name].CheckTimeUp();
        }
    }
}